﻿
@if (Model.ImagesState == EditState.Preview)
{
    <div class="mb-3">
        <CnGalWebSite.Shared.MasaComponent.Shared.Editors.Buttons.RevokeButton Url="@("/videos/EditImages/" + Model.Id)" ExamineType="Operation.EditVideoImages" OnClickRevoke="OnRevoke" />
    </div>
}
<CnGalWebSite.Components.Containers.MasaTitleContainer Outline Title="预览图" Icon="@IconType.PhotoAlbum.ToIconString()">
    <CnGalWebSite.Components.Images.ImageSlideGroup Model="imagesList" />
</CnGalWebSite.Components.Containers.MasaTitleContainer>

@code {
    [Parameter]
    public VideoViewModel Model { get; set; }

    [Parameter]
    public EventCallback<Operation> OnRevoke { get; set; }


    public List<ImagesLargeViewModel> imagesList = new List<ImagesLargeViewModel>();

    protected override void OnParametersSet()
    {
        imagesList.Clear();
        foreach (var item in Model.Pictures)
        {
            foreach (var infor in item.Pictures)
            {
                imagesList.Add(new ImagesLargeViewModel
                {
                    Note = infor.Note,
                    Image = infor.Url
                });
            }
        }

    }
}
